<!--
 * @Description: app 组件
 * @Author: zheng yiliang
 * @Date: 2021-05-09 10:39:14
 * @LastEditTime: 2021-06-13 16:35:41
 * @LastEditors: zheng yiliang
-->
<template>
  <div id="app">
    <keep-alive include="Home, Article">
      <router-view />
    </keep-alive>
    <el-backtop
      :bottom="10"
      style="width: 60px; height: 60px; background-color: transparent"
    >
      <img v-lazy="'/images/back-top.svg'" width="40px" height="40px" />
    </el-backtop>
  </div>
</template>
<script>
//   import { mapMutations } from 'vuex'
import { WOW } from 'wowjs'
export default {
  data() {
    return {}
  },
  async created() {
    await this.$nextTick()
    window.L2Dwidget.init({
      pluginRootPath: '/live2dw',
      pluginJsPath: 'lib/',
      pluginModelPath: 'live2d-widget-model-hibiki/assets/',
      tagMode: false,
      debug: false,
      model: {
        jsonPath: '/live2dw/live2d-widget-model-hibiki/assets/hibiki.model.json'
      },
      display: { position: 'right', width: 150, height: 360 },
      mobile: { show: true, scale: 0.5 },
      log: false
    })
  },
  async mounted() {
    await this.$nextTick()
    var wow = new WOW({
      boxClass: 'wow', //   需要执行动画元素的Class
      animateClass: 'animated', //   animation.css动画的Class
      offset: 0, //   距离可视区域多少开始执行动画
      mobile: true, //   是否在移动设备执行动画
      live: false //   异步加载的内容是否有效
    })
    wow.init()
  },
  computed: {},
  methods: {}
}
</script>
<style lang="scss">
</style>
